Open-source News

libvirt 9.0 Released For Latest Linux Virtualization API

Phoronix - Tue, 01/17/2023 - 19:01
Libvirt 9.0 was released on Monday as the newest version of this Linux Virtualization API. This virtualization API backed by Red Hat continues to support a wide range of hypervisors and with the v9.0 release has added additional functionality...

What's new in Apache ShardingSphere 5.3.0?

opensource.com - Tue, 01/17/2023 - 16:00
What's new in Apache ShardingSphere 5.3.0? y2so Tue, 01/17/2023 - 03:00

After 1.5 months in development, Apache ShardingSphere 5.3.0 has been released. Our community merged 687 PRs from contributors around the world.

The new release has been improved in terms of features, performance, testing, documentation, examples, etc.

The 5.3.0 release brings the following highlights:

  • Support fuzzy query for CipherColumn.
  • Support Datasource-level heterogeneous database.
  • Support checkpoint resume for data consistency check.
  • Automatically start a distributed transaction while executing DML statements across multiple shards.

Additionally, release 5.3.0 also brings the following adjustments:

  • Remove the Spring configuration.
  • Systematically refactor the DistSQL syntax.
  • Refactor the configuration format of ShardingSphere-Proxy.
4 highlights of the Apache ShardingSphere release 1. Support fuzzy query for CipherColumn

In previous versions, ShardingSphere's Encrypt feature didn't support using the LIKE operator in SQL.

For a while, users strongly requested adding the LIKE operator to the Encrypt feature. Usually, encrypted fields are mainly of the string type, and it is a common practice for the string to execute LIKE.

To minimize friction in accessing the Encrypt feature, our community has initiated a discussion about the implementation of encrypted LIKE.

Since then, we've received a lot of feedback.

Some community members even contributed their original encryption algorithm implementation supporting fuzzy queries after fully investigating conventional solutions.

  • The relevant issue can be found here.
  • For the algorithm design, please refer to the attachment within the issue.

The [single-character abstract algorithm] contributed by the community members is implemented as CHAR_DIGEST_LIKE in the ShardingSphere encryption algorithm SPI.

2. Support datasource-level heterogeneous database

ShardingSphere supports a database gateway, but its heterogeneous capability is limited to the logical database in previous versions. This means that all the data sources under a logical database must be of the same database type.

This new release supports datasource-level heterogeneous databases at the kernel level. This means the datasources under a logical database can be different database types, allowing you to use various databases to store data.

Combined with ShardingSphere's SQL dialect conversion capability, this new feature significantly enhances ShardingSphere's heterogeneous data gateway capability.

3. Data migration: support checkpoint resume for data consistency check

Data consistency checks happen at the later stage of data migration.

Previously, the data consistency check was triggered and stopped by DistSQL (Distributed SQL). If a large amount of data was migrated and the data consistency check was stopped for any reason, the check would've had to be started again—which is sub-optimal and affects user experience.

ShardingSphere 5.3.0 now supports checkpoint storage, which means data consistency checks can be resumed from the checkpoint.

For example, if data is being verified during data migration and the user stops the verification for some reason, with the verification progress (finished_percentage) being 5%, then:

mysql> STOP MIGRATION CHECK 'j0101395cd93b2cfc189f29958b8a0342e882'; Query OK, 0 rows affected (0.12 sec) mysql> SHOW MIGRATION CHECK STATUS 'j0101395cd93b2cfc189f29958b8a0342e882'; +--------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ | tables | result | finished_percentage | remaining_seconds | check_begin_time | check_end_time | duration_seconds | error_message | +--------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ | sbtest | false | 5 | 324 | 2022-11-10 19:27:15.919 | 2022-11-10 19:27:35.358 | 19 | | +--------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ 1 row in set (0.02 sec)

In this case, the user restarts the data verification. But the work does not have to restart from the beginning. The verification progress (finished_percentage) remains at 5%.

mysql> START MIGRATION CHECK 'j0101395cd93b2cfc189f29958b8a0342e882'; Query OK, 0 rows affected (0.35 sec) mysql> SHOW MIGRATION CHECK STATUS 'j0101395cd93b2cfc189f29958b8a0342e882'; +--------+--------+---------------------+-------------------+-------------------------+----------------+------------------+---------------+ | tables | result | finished_percentage | remaining_seconds | check_begin_time | check_end_time | duration_seconds | error_message | +--------+--------+---------------------+-------------------+-------------------------+----------------+------------------+---------------+ | sbtest | false | 5 | 20 | 2022-11-10 19:28:49.422 | | 1 | | +--------+--------+---------------------+-------------------+-------------------------+----------------+------------------+---------------+ 1 row in set (0.02 sec)

Limitation: this new feature is unavailable with the CRC32_MATCH algorithm because the algorithm calculates all data at once.

4. Automatically start a distributed transaction while executing DML statements across multiple shards

Previously, even with XA and other distributed transactions configured, ShardingSphere could not guarantee the atomicity of DML statements that are routed to multiple shards—if users didn't manually enable the transaction.

Take the following SQL as an example:

insert into account(id, balance, transaction_id) values (1, 1, 1),(2, 2, 2),(3, 3, 3),(4, 4, 4), (5, 5, 5),(6, 6, 6),(7, 7, 7),(8, 8, 8);

When this SQL is sharded according to id mod 2, the ShardingSphere kernel layer will automatically split it into the following two SQLs and route them to different shards for execution:

insert into account(id, balance, transaction_id) values (1, 1, 1),(3, 3, 3),(5, 5, 5),(7, 7, 7); insert into account(id, balance, transaction_id) values (2, 2, 2),(4, 4, 4),(6, 6, 6),(8, 8, 8);

If the user does not manually start the transaction, and one of the sharded SQL fails to execute, the atomicity cannot be guaranteed because the successful operation cannot be rolled back.

ShardingSphere 5.3.0 is optimized in terms of distributed transactions. If distributed transactions are configured in ShardingSphere, they can be automatically started when DML statements are routed to multiple shards. This way, we can ensure atomicity when executing DML statements.

3 improvements made in Apache ShardingSphere 1. Remove Spring configuration

In earlier versions, ShardingSphere-JDBC provided services in the format of DataSource. If you wanted to introduce ShardingSphere-JDBC without modifying the code in the Spring/Spring Boot project, you needed to use modules such as Spring/Spring Boot Starter provided by ShardingSphere.

Although ShardingSphere supports multiple configuration formats, it also has the following problems:

  1. When API changes, many config files need to be adjusted, which is a heavy workload.
  2. The community has to maintain multiple config files.
  3. The lifecycle management of Spring bean is susceptible to other dependencies of the project, such as PostProcessor failure.
  4. Spring Boot Starter and Spring NameSpace are affected by Spring, and their configuration styles are different from YAML.
  5. Spring Boot Starter and Spring NameSpace are affected by the version of Spring. When users access them, the configuration may not be identified, and dependency conflicts may occur. For example, Spring Boot versions 1.x and 2.x have different configuration styles.

ShardingSphere 5.1.2 first supported the introduction of ShardingSphere-JDBC in the form of JDBC Driver. That means applications only need to configure the Driver provided by ShardingSphere at the JDBC URL before accessing ShardingSphere-JDBC.

Removing the Spring configuration simplifies and unifies the configuration mode of ShardingSphere. This adjustment not only simplifies the configuration of ShardingSphere when using different configuration modes but also reduces maintenance work for the ShardingSphere community.

More on data science What is data science? What is Python? How to become a data scientist Data scientist: A day in the life Use JupyterLab in the Red Hat OpenShift Data Science sandbox Whitepaper: Data-intensive intelligent applications in a hybrid cloud blueprint MariaDB and MySQL cheat sheet Latest data science articles 2. Systematically refactor the DistSQL syntax

One of the characteristics of Apache ShardingSphere is its flexible rule configuration and resource control capability.

DistSQL is ShardingSphere's SQL-like operating language. It's used the same way as standard SQL and is designed to provide incremental SQL operation capability.

ShardingSphere 5.3.0 systematically refactors DistSQL. The community redesigned the syntax, semantics, and operating procedure of DistSQL. The new version is more consistent with ShardingSphere's design philosophy and focuses on a better user experience.

Please refer to the latest ShardingSphere documentation for details. A DistSQL roadmap will be available soon, and you're welcome to leave your feedback.

3. Refactor the configuration format of ShardingSphere-Proxy

In this update, ShardingSphere-Proxy has adjusted the configuration format and reduced the config files required for startup.

server.yaml before refactoring:

rules: - !AUTHORITY users: - root@%:root - sharding@:sharding provider: type: ALL_PERMITTED - !TRANSACTION defaultType: XA providerType: Atomikos - !SQL_PARSER sqlCommentParseEnabled: true sqlStatementCache: initialCapacity: 2000 maximumSize: 65535 parseTreeCache: initialCapacity: 128 maximumSize: 1024

server.yaml after refactoring:

authority: users: - user: root@% password: root - user: sharding password: sharding privilege: type: ALL_PERMITTED transaction: defaultType: XA providerType: Atomikos sqlParser: sqlCommentParseEnabled: true sqlStatementCache: initialCapacity: 2000 maximumSize: 65535 parseTreeCache: initialCapacity: 128 maximumSize: 1024

In ShardingSphere 5.3.0, server.yaml is no longer required to start Proxy. If no config file is provided by default, Proxy provides the default account root/root.

ShardingSphere is completely committed to becoming cloud-native. Thanks to DistSQL, ShardingSphere-Proxy's config files can be further simplified, which is more friendly to container deployment.

Release Notes API Changes
  1. DistSQL: refactor syntax API; please refer to the user manual
  2. Proxy: change the configuration style of the global rule, remove the exclamation mark
  3. Proxy: allow zero-configuration startup, enable the default account root/root when there is no Authority configuration
  4. Proxy: remove the default logback.xml and use API initialization
  5. JDBC: remove the Spring configuration and use Driver + YAML configuration instead
Enhancements
  1. DistSQL: new syntax REFRESH DATABASE METADATA, refresh logic database metadata
  2. Kernel: support DistSQL REFRESH DATABASE METADATA to load configuration from the governance center and rebuild MetaDataContext
  3. Support PostgreSQL/openGauss setting transaction isolation level
  4. Scaling: increase inventory task progress update frequency
  5. Scaling: DATA_MATCH consistency check support checkpoint resume
  6. Scaling: support drop consistency check job via DistSQL
  7. Scaling: rename column from sharding_total_count to job_item_count in job list DistSQL response
  8. Scaling: add a sharding column in incremental task SQL to avoid broadcast routing
  9. Scaling: sharding column could be updated when generating SQL
  10. Scaling: improve column value reader for DATA_MATCH consistency check
  11. DistSQL: encrypt DistSQL syntax optimization, support like query algorithm
  12. DistSQL: add properties value check when REGISTER STORAGE UNIT
  13. DistSQL: remove useless algorithms at the same time when DROP RULE
  14. DistSQL: EXPORT DATABASE CONFIGURATION supports broadcast tables
  15. DistSQL: REGISTER STORAGE UNIT supports heterogeneous data sources
  16. Encrypt: support Encrypt LIKE feature
  17. Automatically start distributed transactions when executing DML statements across multiple shards
  18. Kernel: support client \d for PostgreSQL and openGauss
  19. Kernel: support select group by, order by statement when a column contains null values
  20. Kernel: support parse RETURNING clause of PostgreSQL/openGauss Insert
  21. Kernel: SQL HINT performance improvement
  22. Kernel: support mysql case when then statement parse
  23. Kernel: support data source level heterogeneous database gateway
  24. (Experimental) Sharding: add sharding cache plugin
  25. Proxy: support more PostgreSQL datetime formats
  26. Proxy: support MySQL COM_RESET_CONNECTION
  27. Scaling: improve MySQLBinlogEventType.valueOf to support unknown event type
  28. Kernel: support case when for federation
Bug Fix
  1. Scaling: fix barrier node created at job deletion
  2. Scaling: fix part of columns value might be ignored in DATA_MATCH consistency check
  3. Scaling: fix jdbc url parameters are not updated in consistency check
  4. Scaling: fix tables sharding algorithm type INLINE is case-sensitive
  5. Scaling: fix incremental task on MySQL require mysql system database permission
  6. Proxy: fix the NPE when executing select SQL without storage node
  7. Proxy: support DATABASE_PERMITTED permission verification in unicast scenarios
  8. Kernel: fix the wrong value of worker-id in show compute nodes
  9. Kernel: fix route error when the number of readable data sources and weight configurations of the Weight algorithm are not equal
  10. Kernel: fix multiple groups of readwrite-splitting refer to the same load balancer name, and the load balancer fails problem
  11. Kernel: fix can not disable and enable compute node problem
  12. JDBC: fix data source is closed in ShardingSphereDriver cluster mode when startup problem
  13. Kernel: fix wrong rewrite result when part of logical table name of the binding table is consistent with the actual table name, and some are inconsistent
  14. Kernel: fix startup exception when use SpringBoot without configuring rules
  15. Encrypt: fix null pointer exception when Encrypt value is null
  16. Kernel: fix oracle parsing does not support varchar2 specified type
  17. Kernel: fix serial flag judgment error within the transaction
  18. Kernel: fix cursor fetch error caused by wasNull change
  19. Kernel: fix alter transaction rule error when refresh metadata
  20. Encrypt: fix EncryptRule cast to TransparentRule exception that occurs when the call procedure statement is executed in the Encrypt scenario
  21. Encrypt: fix exception which caused by ExpressionProjection in shorthand projection
  22. Proxy: fix PostgreSQL Proxy int2 negative value decoding incorrect
  23. Proxy: PostgreSQL/openGauss support describe insert returning clause
  24. Proxy: fix gsql 3.0 may be stuck when connecting Proxy
  25. Proxy: fix parameters are missed when checking SQL in Proxy backend
  26. Proxy: enable MySQL Proxy to encode large packets
  27. Kernel: fix oracle parse comment without whitespace error
  28. DistSQL: fix show create table for encrypt table
Refactor
  1. Scaling: reverse table name and column name when generating SQL if it's SQL keyword
  2. Scaling: improve incremental task failure handling
  3. Kernel: governance center node adjustment, unified hump to underscore
Links Community Contribution

This Apache ShardingSphere 5.3.0 release is the result of 687 merged PRs, committed by 49 contributors. Thank you for your efforts.

This article originally appeared on ShardingSphere 5.3.0 is released: new features and improvements and is republished with permission.

The latest release of Apache ShardingSphere includes improvements to features, performance, testing, documentation, examples, and more.

Image by:

Opensource.com

Databases What to read next 5 new improvements in Apache ShardingSphere This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

How open source is addressing food sovereignty

opensource.com - Tue, 01/17/2023 - 16:00
How open source is addressing food sovereignty ffurtado Tue, 01/17/2023 - 03:00

Our food system is broken. As with so many systems of the 21st century, power is concentrated in the hands of very few companies, often geared toward exploiting people and the planet, under the premise of maximizing profit. Under such a mindset, feeding people is a secondary goal. When it comes to something as important as food, we can and should aim for more than this as a society. What if the goal became getting high-quality, nutritious, and ecologically regenerative produce from farms to plates of every person in the world?

Image by:

(Open Food Network UK, CC BY-SA 3.0)

We believe getting food to everyone is not a radical concept. But getting there requires radical thinking. It requires putting the people most involved in the food system (producers, eaters, and communities) at the heart of the food system. It means putting collaboration above intellectual property. It means creating a commonwealth of knowledge and resources. This is the approach we are taking at the Open Food Network (OFN).

Image by:

Open Food Network, CC BY-SA 4.0

What is the Open Food Network?

OFN was founded in Australia 10 years ago by two farmers. The launch was empowered by the capacity to create a network of small-scale farmers and shops dedicated to improving how food is sold and delivered to people.

Many initiatives already existed at that time (community-supported agriculture CSA, buying groups, local food stores), but none of them were working on the technology needed to leverage cooperation between the different actors on food supply chains. This was the main motivation and goal for the founders of OFN: to provide a web platform to help projects interact and collaborate, as a thriving network.

Image by:

(Open Food Network Australia, CC BY-SA 3.0)

Why use open source?

Joining a network often means having the capacity to access peer knowledge and resources. Creating OFN also meant combining the effort in maintaining infrastructure and tools. This was appealing to everyone who wanted to join, but needed to happen without compromising each actor's sovereignty in the process.

To illustrate, take a look at the following example.

If you decide to launch a local and organic tree farming business, there is a good chance you might need to work on improving the land you've just bought. In some cases this leads to years of hard work. During this time, it's hard to use the services of a young startup that can close their service early or decide to increase their fees. If this happens, you either have to change software or absorb the impact in your own business model. In the farming world, this can put many small businesses in jeopardy.

Yet, the solution to rely only on software solutions from established companies would actually recreate on the software side the same concentration of power you are trying to avoid on the food side.

That's why the OFN software platform was released. From the very start, it operated under the AGPL v3 license. This is a license that allows anyone to contribute or reuse, as long as they share their work under the same license again. This meant working on community guidelines on how contributions can be done. It also meant creating rules for how people work together. Yes, the local startup which offers OFN as a service can still fail and close its doors. But having a community-led open source software means you can find other companies or organizations to run and improve the software for you. You are not tied up with only one organization.

Image by:

(Open Food Network Australia, CC BY-SA 3.0)

However, free software does not prevent you from an unexpected rise in service fees (unless you're actually deploying your own server). That's why OFN operates on an open and transparent governance model. We use collaborative decision-making within our global network of communities. We also work collaboratively with farmers and food enterprises in each country to design software and resources that support their needs.

So, as a software user, you can join the governance of your local provider through membership or shareholding. There, you can share your voice before changes occur in the way the service is provided to you (price, quality, availability).

More great content Free online course: RHEL technical overview Learn advanced Linux commands Download cheat sheets Find an open source alternative Explore open source resources What is OFN doing today?

Ten years after its launch, OFN is a community spreading across three continents with 15 live production instances. More than 6,000 farmers and 700 local shops are using the software on a day-to-day basis.

This was made possible because passionate, dedicated people from all around the world are putting in the time, great ideas, and hard work to build and maintain the software platform. They also create the resources needed to build a better food system.

We work together so that we're all helping each other reach each goal we set, which means that we get more than we could possibly create on our own!

Image by:

(Open Food Network Australia, CC BY-SA 3.0)

To help keep this awesome community moving forward, we recently decided to launch a GitHub sponsor page. While we want each local provider of the software to become sustainable and contribute to the main software maintainability, we are not at this stage yet. We rely heavily on grants and other public or private funding.

Feel free to join our community forum or check out our GitHub repo to learn more about us!

Open Food Network (OFN) is a network of small-scale farmers and shops dedicated to improving how food is sold and delivered to people.

Image by:

Open Food Network, CC BY-SA, 4.0

Sustainability What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. 35 points France

Rachel has over ten years’ experience in building and designing web platforms for social and ecological aims. She has joined the Open Food Network 4 years ago as a product lead and works alongside on various open source projects.
You can connect with me on Mastodon.

| Follow rachel_arn | Connect rachelarnould Open Enthusiast Author 31 points Waterfall Country, Wales

Lynne Davis is a product lead working on various open source projects driven by community-led social and ecological transformation, including:
Open Food Network: https://github.com/openfoodfoundation/openfoodnetwork
Land Explorer: https://github.com/DigitalCommons/land-explorer-front-end

| Follow linndav | Connect lynne-davis-76256940 Open Enthusiast Author Register or Login to post a comment.

How to Use “sleep” Command in Linux [6 Useful Examples]

Tecmint - Tue, 01/17/2023 - 15:02
The post How to Use “sleep” Command in Linux [6 Useful Examples] first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

Brief: In this guide, we will discuss practical examples of sleep commands. After following this guide, Linux programmers will be able to use the sleep command to write robust shell scripts. Linux programmers and

The post How to Use “sleep” Command in Linux [6 Useful Examples] first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

Getting to know Enzo Compagnoni, regional vice president & general manager for Red Hat ANZ

Red Hat News - Tue, 01/17/2023 - 08:00
<drupal-media data-align="center" data-entity-type="media" data-entity-uuid="4a04f23e-d9c2-44e9-a649-774152954576"></drupal-media> <p>We’re delighted to share that Enzo Compagnoni has moved into the role of regional vice president and general manager for Red Hat Australia and New Zealand (ANZ). In his new role, Compagnoni will be responsible for leading the Red Hat business in ANZ, helping to drive the digital transformation success of customers and partners across the region.&nbsp;&amp

Pages