By | Thursday, April 22, 2021


  • Table of Contents
  • Share your project with us
  • Examples Of Blockchain Applications
  • Blockchain
  • Table of Contents

    The inevitable onslaught of blockchain adoption will render numerous practices obsolete. Data scientists should be allowed to directly promote code from to production this intermediate step. Apps Details: Educational apps look like, and games can also teach things. Other AWS resources that are created on behalf of an individual project include IAM roles that govern who access the project environment and what permissions they have within the environment. Blockchain Applications Blockchain Applications Examples


    Those two examples are of apps that exist in all three app forms, but that isn't always the case. For example, you can get to your Gmail messages through the official Gmail.

    In this case, Gmail is both a mobile and web app but not a desktop app. You can add it or remove it as desired. Others often games are similar in that there are both mobile and web versions of the same game but maybe not a desktop app, or there might be a desktop version of the game, but it's not available on the web or as a mobile app. In the context of mobile apps, almost every platform has a repository where its users can download both free and paid apps. These are normally accessible through the device itself or a website so that the app can be queued up for download the next time the user is on the device.

    Desktop apps are more widely available from unofficial sources such as Softpedia and FileHippo. Google refers to its online services as apps, but the company also sells a specific suite of services known as Google Apps for Work.

    Marziah Karch. Marziah Karch is a former writer for Lifewire who also excels at Serious Game Design and develops online help systems, manuals, and interactive training modules. Updated on December 02, Ryan Perian. Lifewire Tech Review Board Member. Article reviewed on Sep 13, Apps Best Apps Payment Services. Tweet Share Email. Was this page helpful? Thanks for letting us know! Email Address Sign up There was an error.

    Please try again. You're in! If you find this to be the case, you might consider mobile app development for enterprise. To make it easier and faster, look into mobile enterprise application platforms, or MEAPs. Best enterprise apps for businesses in Again, this is a job for machine learning.

    Route planning. Considering the safety factor. Apps Details: Mobile apps and travel were meant for each other. Travelers use their mobile phones to check their flights, pack their suitcases, find the best deals, check into hotels, find the best route around a new city, and learn about places worth seeing. Apps Details: Independence from frameworks and databases makes apps built with Clean Architecture maintainable and flexible.

    Project example: ALLO, a huge electronics retailer. Allo is a big electronics retailer that owns over physical shops around Ukraine. This is a android application development project we are proud of. Apps Details: Mobile apps for agriculture are a great option as they give farmers an opportunity to work in the field more effectively.

    Countries with the biggest agricultural sectors in the world, including China, the US, Ukraine, India, and a large number of African countries are adopting mobile technology for use in farming. Apps Details: There are over 2 million healthcare-related mobile apps on the app stores.

    There are applications for workouts, health management, childcare, contacting doctors, and more. To build a medical app that will stand this competition, you need to choose your niche and know it well.

    Apps Details: Mobile apps have already became an important part of many industries, and we strongly believe that such a huge market as health insurance also needs to become more modern and convenient for everyone with the help of applications. Creating a health insurance mobile app is a win-win, as it will become easier for your customers to interact with.

    Apps Details: The number of mHealth apps is growing each year, and though the market seems oversaturated, few of these apps are competitive. Apps Details: There are already lots of people who make online purchases through mobile apps, and if you make your checkout simple, your customers will gladly use it. According to Statista, Apple Pay is the third most popular payment app in Canada.

    In , Apple Pay was the third most popular payment app in Canada. Apps Details: Educational apps look like games, and games can also teach things.

    The best examples of gaming apps for kids are those derived from famous computer or console games, like Mario, Minecraft, and Animal Crossing, which was based on a classic Nintendo game.

    Apps Details: Video chat apps are all about communication and interactions. Add features so users can search for people, find friends, and invite them to join a chat. Video chat app development services. Apps Details: 3 best telemedicine apps These are some examples of best telemedicine apps, that set standards for the whole industry and can serve as an inspiration for your own telemedicine app development project.

    Versions of operating systems also differ and change rather often, forcing testers to react to those changes. The differences between mobile and desktop testing are pretty big, and you should bear that in mind. Apps Details: Mobile app market overview and predictions. The mobile market may seem oversaturated, digital transformation for companies became an essential, as there are already over 5,, apps in the Google Play Store and Apple App Store combined.

    Apps Details: Developing Uber-like apps is a popular trend in the global startup arena today. Despite the rapid growth of the ridesharing market, it may seem impossible to win against existing big players. But in fact, many local ridesharing companies such as Gett, Ola, DiDi, and BlaBlaCar are doing surprisingly well, despite heavy competition from Uber and. Apps Details: Mobile apps can be integrated with Salesforce and provide the best service for clients and work environment for your team.

    According to statistics, customer support is the most popular service from CRM systems. If you already have one, Salesforce would be a great addition to your m-commerce toolbox, as it allows you to integrate it with minimal.

    Apps Details: Nowadays, almost every type of app uses maps: ecommerce, dating, travel, fitness, and more. Location-based services are present in many apps as a core or additional feature. Using Google Maps in an app opens a whole range of possibilities to increase loyalty to your product. Pros: — Easy to learn. Apps Details: Background. Our client came to us with an idea for a web app for lawyers.

    His friend recommended Mobindustry as a flexible mobile development partner that could not only create a web application, but also create a web development documentation and help with a business strategy.. Music player Neumorphism by Alena Yurina. Neomorphism is a design trend that involves creating elements in a realistic style. The rise of virtual and augmented reality technologies and the latest design. Apps Details: I created a demo project for use by businesses that sell products and services of various types.

    This app has a catalog, product profiles and ratings. The content in the app can be changed easily, so clients are able to get a personalized demonstration product in a short amount of time. Apps Details: The growing market for fitness apps provides opportunities for creating new software for wearables. Final Thoughts. Healthcare and fitness are two of the fastest-growing markets in the world. Apps Details: Businesses and organizations of all kinds build apps of different levels of complexity, and it can be overwhelming to understand what technologies will be best suited for your individual case.

    Choosing the web app architecture design is the most important step in its development. Apps Details: Here at Mobindustry, we operate with an Agile approach. That means we use Agile components like user stories and acceptance criteria. High-performing teams and organizations have these components in their product backlogs, and they know how to create them and use them effectively.

    Apps ZO. Top 10 Ski Mobile Apps to learn from Mobindustry Apps Details: Some apps allow users to contribute data on hazards and obstacles on traces in order to inform other skiers about dangerous routes or slippery slopes. How to Build a Food Ordering Mobile App Mobindustry Apps Details: In these apps, customers can browse restaurants and menus, place orders, and pay without having to say a word. How to create an Agriculture App for Farmers Mobindustry Apps Details: Advisor apps help to connect farmers to advisors and solve problems in a snap without having to be physically present on the field.

    How to Develop the Best Hospital App? Top 10 Dating Apps. Mobile dating in Mobindustry Apps Details: India, France, and the United Kingdom have quite fragmented markets, with apps such as happn and Bumble taking a big part of the download share. Android App Development Services Mobindustry Apps Details: Independence from frameworks and databases makes apps built with Clean Architecture maintainable and flexible.

    How To Deliver Health Insurance via Mobile Apps Mobindustry Apps Details: Mobile apps have already became an important part of many industries, and we strongly believe that such a huge market as health insurance also needs to become more modern and convenient for everyone with the help of applications.

    What are the Pros and Cons of mHealth? Mobindustry Apps Details: The number of mHealth apps is growing each year, and though the market seems oversaturated, few of these apps are competitive. How to make a custom video calling app? Mobindustry Apps Details: Video chat apps are all about communication and interactions. Integrating Salesforce's Live Agent into Your Mobile App Apps Details: Mobile apps can be integrated with Salesforce and provide the best service for clients and work environment for your team.

    Share your project with us

    Watch Azure engineers configure and deploy blockchain infrastructure in this on-demand Channel 9 webinar. GE Aviation uses blockchain to streamline tracking of aircraft parts from factory to flight. Starbucks uses Azure to empower small-hold farmers and track its products from bean to barista. Insurwave uses distributed common ledgers to reduce risk and exposures for insurance clients, brokers, insurers, and third parties. Webjet uses Azure to support Rezchain, a payment reconciliation service for the online travel market.

    Nasdaq brings blockchain technology to capital markets to manage transaction delivery, payment, and settlement from multiple blockchains and payment mechanisms. Microsoft uses blockchain solutions to compute royalty statements for Xbox game publishers in hours, instead of months.

    It allows organizations to streamline shared workstreams—such as supply chains—by exchanging and tracking assets and transactions on a shared ledger often called distributed ledger technology, or DLT. In addition to supply chain and shared workstream applications, developers are driving new revenue streams by creating blockchain-based products and services.

    A "block" is a cluster of data within the blockchain that has both a unique identifier and a history. Blockchain is a transparent and verifiable system. As a shared, secure ledger of transactions distributed among a network of computers, blockchain eliminates waste, reduces the risk of fraud, and enables the creation of new revenue streams. Azure Blockchain Service uses several Azure capabilities to keep your data secure and available.

    Data is secured using isolation, encryption, and authentication. The decentralized and immutable characteristics of blockchain make it very secure. Deploy fully managed blockchain networks in a few clicks and govern at scale with codeless consortia management. Home Solutions Blockchain.

    Blockchain Create smarter, more efficient supply chains, reduce fraud, verify transactions more quickly, and create disruptive new business models with Azure blockchain services. Get started. STEP 1 Launch and manage your network. Create the foundation of your blockchain application by deploying your consortium network, deploying a ledger, inviting members, and setting up permissions: Configure, deploy, and manage your app using preconfigured networks and managed infrastructure with Azure Blockchain Service PREVIEW.

    Additionally, in SageMaker Studio, SageMaker Experiments tracks the user profile of the user launching jobs, providing additional auditability. We demonstrate the use of SageMaker Experiments and how you can use Experiments to search for specific trials and extract the model metadata in Labs 3—4 of the Using Secure Environments workshop.

    In this workshop, we demonstrate one methodology for doing so, using Shapley values. We note however that this approach is by no means exhaustive and you should work with your risk, legal, and compliance teams to assess legal, ethical, regulatory, and compliance requirements for, and implications of, building and using ML systems. Deployed endpoints should be monitored against data drift as a best practice. In these workshops, we demonstrate how SageMaker Model Monitor automatically extracts the statistics from the features as a baseline, captures the input payload and the model predictions, and checks for any data drift against the baseline at regular intervals.

    The detected drift can be visualized using SageMaker Studio and used to set thresholds and alarms to re-trigger model retraining or alert developers of model drift. To audit ML environments, admins can monitor instance-level metrics related to training jobs, processing jobs, and hyperparameter tuning jobs using CloudWatch Events. You can use lifecycle configurations to also publish Jupyter logs to CloudWatch. Here we demonstrate the use of detective and preventive controls to prevent data scientists from launching training jobs outside the project VPC.

    Additional preventive controls using IAM condition keys such as sagemaker:InstanceTypes may be added to prevent data scientists from misusing certain instance types such as the more expensive GPU instances or enforcing that data scientists only train models using AWS Nitro System instances, which offer enhanced security. Studio notebook logs are automatically published to CloudWatch. However, a consistent pain point for data science and IT teams across enterprises has been the challenge to create repeatable environments that can be easily scaled across the organization.

    These products can be shared across accounts, and a consistent taxonomy can be enforced using the TagOptions Library. Administrators can design products for the data science teams to run in their accounts that provision all the underlying resources automatically, while allowing data scientists to customize resources such as underlying compute instances GPU or CPU required for running notebooks, but disallowing data scientists from creating notebook instances any other way.

    Similarly, admins can enforce that data scientists enter their user information while creating products to have visibility on who is creating notebooks. To allow teams to move at speed and to free constrained cloud operations teams from easily automated work, this workshop uses the AWS Service Catalog to automate common activities such as SageMaker notebook creation.

    AWS Service Catalog provides you with a way to codify your own best practice for deploying logically grouped assets, such as a project team environment, and allow project teams to deploy these assets for themselves. The AWS Service Catalog allows cloud operations teams to give business users a way to self-service and obtain on-demand assets that are deployed in a manner compliant with internal IT policies.

    Business users no longer have to submit tickets for common activities and wait for the ticket to be serviced by the cloud operations team. Additionally, AWS Service Catalog provides the cloud operations team with a centralized location to understand who has deployed various assets and manage those deployed assets to ensure that, as IT policy evolves, updates can be provided across provisioned products.

    This is covered in detail in Labs 1—2 of the Building Secure Environments workshop. To demonstrate this capability, the workshop uses cost tags to track all resources associated with any given project. The cost tags used in this workshop tag resources like SageMaker training jobs, VPCs, and S3 buckets with the project name and the environment type development, testing, production. You can also use SageMaker Processing to offload feature engineering tasks and SageMaker Training jobs to train models at scale, and use lightweight notebooks and further save on costs.

    As we show in this workshop, admins can enforce this directly by allowing data scientists to create notebooks only via AWS Service Catalog using approved instance types only. In this series of workshops , we have implemented a number of features and best practices that cover the most common pain points that CTO teams face when provisioning and using secure environments for ML. For a detailed discussion on ML governance as it applies to regulated industries such as financial services, see Machine Learning Best Practices in Financial Services.

    Additionally, you may want to look at the AWS Well-Architected guidelines as they apply to machine learning and financial services , respectively. Jason supports customers to accelerate and optimize their business by leveraging cloud services. Jason has 20 years of professional experience developing systems for use in secure, sensitive environments. He has led teams of developers and worked as a systems architect to develop petabyte scale analytics platforms, real-time complex event processing systems, and cyber-defense monitoring systems.

    Today he is working with financial services customers to implement secure, resilient, and self-healing data and analytics systems using open-source technologies and AWS services. Stefan Natu is a Sr. He is focused on helping financial services customers build end-to-end machine learning solutions on AWS. In his spare time, he enjoys reading machine learning blogs, playing the guitar, and exploring the food scene in New York City.

    The most watched and anticipated commercials of the year—and certainly the most expensive—air during the Super Bowl, and each is met with scrutiny and judgement. After nearly six decades without an appearance in a commercial, The Boss stunted for Jeep , in what many critics consider to be the best of the Super Bowl LV bunch.

    Despite reports of viewer fails, and the worst ratings since , So who won? Still, the eight highest-performing ads, with Quality Scores between 7 and 10, performed particularly well because of their strength in encoding. Our editors highlight the TechRepublic articles, downloads, and galleries that you cannot miss to stay current on the latest IT news, innovations, and tips. Sign up today.

    The ability to rapidly iterate and train machine learning ML models is key to deriving business value from ML workloads. Depending on the number of hyperparameters and the size of the search space, finding the best model can require thousands or even tens of thousands of training runs.

    Real-world problems that often require extensive HPO include image segmentation for modeling vehicular traffic for autonomous driving, developing algorithmic trading strategies based on historical financial data, or building fraud detection models on transaction data. This post shows how to batch your HPO jobs to maximize the number of jobs you can run in parallel, thereby reducing the total time it takes to effectively cover the desired parameter space and obtain the best-performing models.

    There are a large number of HPO algorithms, ranging from random or grid search, Bayesian search, and hand tuning, where researchers use their domain knowledge to tune parameters to population-based training inspired from genetic algorithms.

    For deep learning models, however, even training a single training run can be time consuming. In that case, it becomes important to have an aggressive early stopping strategy, which ends trials in search spaces that are unlikely to produce good results. Several strategies like successive halving or asynchronous successive halving use multi-arm bandits to trade-off between exploration trying out different parameter combinations versus exploitation allowing a training run to converge.

    To train a model, you use historical data available from the UCI repository. All the code developed in this post is made available on GitHub. The notebook covers the data preprocessing required to prep the raw data for training. See the following code:. You can then adapt this to your own custom deep learning code. We create a custom Dataset class to fetch our data and wrap this in the DataLoader class to iterate over the dataset.

    We set the batch size to 1, because each batch consists of 10, rows, and load it using Pandas. A more useful metric is the AUC, which is the area under the receiver operator characteristic ROC curve that aims to minimize the number of false positives while maximizing the number of true positives. A false positive model incorrectly predicting a good customer will default on their payment can cause the bank to lose revenue by denying credit cards to customers.

    To run multiple hyperparameter tuning jobs in parallel, we must first determine the tuning strategy. SageMaker currently provides a random and Bayesian optimization strategy. For random strategy, different HPO jobs are completely independent of one another, whereas Bayesian optimization treats the HPO problem as a regression problem and makes intelligent guesses about the next set of parameters to pick based on the prior set of trials.

    Suppose you want to run 10, total trials. To minimize the total HPO time, you want to run as many trials as possible in parallel. If you want to modify or increase those limits, speak to your AWS account representatives. This means that you can simultaneously run 20 trials of one instance each. So one approach to batch your code is to always have two jobs running, until you meet your total required jobs of In the following code snippet, we show two ways in which you can poll the number of running jobs to achieve this.

    This approach can primarily be used by data scientists. Whenever the number of running HPO jobs falls below a fixed number, indicated by the blue arrows in the dashed box on the left, the polling code will launch new jobs shown in orange arrows.

    Sounds complicated? No problem, the following code snippet allows you to determine the optimal strategy to minimize your overall HPO time by running as many HPO jobs in parallel as allowed. After you determine how to run your jobs, consider the following code for launching a given sequence of jobs. Now, we can test this out by running a total of trials, and request that the code run 20 trials in parallel at all times:.

    Now suppose you want to run a warm start job, where the result of a prior job is used as input to the next job. Warm start is particularly useful if you have already determined a set of hyperparameters that produce a good model but now have new data.

    Another use case for warm start is when a single HPO job can take a long time, particularly for deep learning workloads. In that case, you may want to use the outputs of the prior job to launch the next one.

    For our use case, that could occur when you get a batch of new monthly or quarterly default data. The crucial difference between warm and cold start is the naturally sequential nature of warm start.

    Again, suppose we want to launch 10, jobs with warm start. We repeat the process until the total desired number of jobs is reached. We can achieve this with the following code:. SageMaker offers the flexibility to use other HPO tools such as the ones discussed earlier to run your HPO jobs by removing the undifferentiated heavy lifting of managing the underlying infrastructure.

    To use Ray with PyTorch, you first need to include ray[tune] and tabulate to your requirements. Provide the code folder into the SageMaker PyTorch estimator as follows:. Your training script needs to be modified to output your custom metrics to the Ray report generator, as shown in the following code. This allows your training job to communicate with Ray.

    Here we use the ASHA scheduler to implement early stopping:. Finally, you need to wrap the training script in a custom main function that sets up the hyperparameters such as the learning rate, the size of the first and second hidden layers, and any additional hyperparameters you want to iterate over.

    We use the default tuning algorithm Variant Generation , which supports both random shown in the following code and grid search, depending on the config parameter used. Ray Tune automatically ends poorly performing jobs while letting the better-performing jobs run longer, optimizing your total HPO times. In this case, the best-performing job ran all full 7 epochs, whereas other hyperparameter choices were stopped early. When multiple data scientists create HPO jobs in the same account at the same time, the limit of concurrent HPO jobs per account might be reached.

    Each message contains hyperparameters and tunable hyperparameter ranges in the message body. A Lambda function is also created. The function first checks the number of HPO jobs in progress. The function is triggered by Amazon EventBridge events at a regular interval for example, every 10 minutes.

    The simple architecture is shown as follows. In the Lambda function, we use the following code to return the number of HPO jobs in progress:. If the number of HPO jobs in progress is greater than or equal to the limit of concurrent HPO jobs for current limits, see Amazon SageMaker endpoints and quotas , the Lambda function returns status and exits. Then the Lambda function extracts hyperparameter ranges and other data fields for creating HPO jobs.

    When this is complete, you can test it out by sending messages to the SQS queue with your HPO job configuration in the message body.

    The code and notebook for this architecture is on our GitHub repo. ML engineers often need to search through a large hyperparameter space to find the best-performing model for their use case. For complex deep learning models, where individual training jobs can be quite time consuming, this can be a cumbersome process that can often take weeks or months of developer time.

    In this post, we discussed how you can maximize the number of tuning jobs you can launch in parallel with SageMaker, which reduces the total time it takes to run HPO with custom user-specified objective metrics.

    We first discussed a Jupyter notebook based approach that can be used by individual data scientists for research and experimentation workflows. We also demonstrated how to use an SQS queue to allow teams of data scientists to submit more jobs.

    SageMaker is a highly flexible platform, allowing you to bring your own HPO tool, which we illustrated using the popular open-source tool Ray Tune. To learn more about bringing other algorithms such as genetic algorithms to SageMaker HPO, see Bring your own hyperparameter optimization algorithm on Amazon SageMaker. His work is centered around improvements to the Amazon SageMaker platform and helping customers best use its features.

    In his spare time, he likes to catch up on recent research in ML and do outdoor sports such as ice skating or hiking. Enrico Sartorello is a Sr. He helps customers adopt machine learning solutions that fit their needs by developing new functionalities for Amazon SageMaker.

    In his spare time, he passionately follows his soccer team and likes to improve his cooking skills. The technology manages billions of devices at once and can even self-diagnose and heal possible breaches. Xage is primarily used by IoT companies in the transportation, energy and manufacturing industries.

    Apps Detail View All Apps. Posted: 1 days ago Examples of blockchain financial services applications Asset Management: Trade Processing and Settlement Traditional trade processes within asset management where parties trade and manage assets can be expensive and risky, particularly when it comes to cross-border transactions. Posted: 2 days ago The database of blockchain is managed by peer to peer network and by a distributed timestamping server.

    It can be described as a value-exchange protocol. There are basically three types of Blockchain: Public blockchains, Private blockchains, Consortium blockchain. Top 10 Applications of Blockchain in Real World. Posted: 9 days ago Everledger, using the Hyperledger platform, developed a blockchain solution for the diamond supply chain to help prevent fraud and illicit trading.

    Everledger traces the journey of every stone from mining to consumer. Posted: 3 days ago Now we do see different examples of blockchain applications in different industries from artificial intelligence to automobiles. It is estimated that by , 10 percent of the global GDP will be stored on the blockchain. The use cases of this particular technology may vary, but the benefits derived from it remain unchanged. Posted: 3 days ago Warranteer —A blockchain application that allows consumers to easily access info regarding the products they purchased and get service in the case of product malfunction.

    Blockpoint —Simplifies the Posted: 2 days ago Blockchain technology is a revolution for this changing technological world. It has immense applications, ranging from finance to healthcare and making secure payments to the internet of things, Posted: 3 days ago One of the main benefits of blockchain technology is the way it removes intermediaries or middlemen. The music business is a prime example of an industry whose inefficiencies have seen artists Posted: 5 days ago In contrast to the idea that blockchain technology is just an abstract field of data, smart contracts have allowed an entire world of new applications designed to solve many real-world problems.

    Posted: 6 days ago Say the word blockchain and people immediately think of cryptocurrency. Originally, blockchain was a way to prevent people from tampering with the timestamps of documents. Why Enterprise Blockchain? The key tenant of public blockchains is decentralization and transparency.

    Posted: 5 days ago Blockchain Applications. Many organizations around the globe realize the need and importance of Blockchain technology to improve the legacy systems and digital processes in terms of transactions and record-keeping technology in favor of more flexible and efficient structures.

    Practical applications of blockchain in the financial services industry include client screening and onboarding, recordkeeping, data privacy and security, and trade processing. Progressive executives are already exploring industry blockchain applications and realizing the value that removing friction, building trust and unlocking new value across their business can provide.

    Posted: 3 days ago The applications of blockchain will widely vary from one industry to the other. Example 1: Guardtime and real-time Posted: 2 days ago Companies like Slock, which is an Ethereum-enabled internet-of-things platform, uses this application to allow customer to rent bicycles where they can unlock a smart lock after both parties agreed Posted: 2 days ago Bitcoin and Ethereum are popular examples of blockchains.

    Everyone is allowed to connect to the blockchain and transact on them. Here is the video for your reference: Anyone can download a copy of Bitcoin, Ethereum, and other blockchains for free and run a node on your computer.

    Posted: 19 days ago There are many ideas, but concrete applications in the area of marketing and advertising are still rare. As the past teaches, it will be early adopters, creative thinkers, and pioneers who will and must find use cases.

    Below we present are application examples for blockchain technology in digital marketing : 1. Better Data Management And User Posted: 2 days ago Kaleido was the first Blockchain platform to offer native smart contract management, providing a full toolkit with visibility on contract deployment.

    Smart contracts have the potential to transform many industries in the s. Here are but a few examples: Trade Finance Smart contracts can reduce costly errors. The ability for these contracts

    Examples Of Blockchain Applications


    Real-world problems that often require extensive HPO include image segmentation for modeling vehicular traffic for driving, developing algorithmic trading strategies based on financial data, or building fraud detection models on transaction data. Hence, it is critical for a contract to be kept isolated in a sandbox to save the entire ecosystem any negative effects, Https:// of talking to a web server, this website will talk directly to the blockchain. Article reviewed on Sep 13, Next, we need a place to this products on the blockchain.


    If you are interested in the technical aspects of how to create a application on top of the Blockchain then you should definitely learn the ins and outs crypto-economics. You can add it remove it as desired. Next,, we'll create a function that adds the product to the blockchain by calling the createProduct function with Web3. This covered in detail in Labs of the Building Secure Environments workshop. Suppose you want to run 10, total trials. Stratis Team.

    That's because it represents a digital contract or agreement. After all, you wouldn't want any other real-world contract to change after it is created, would you? You can think of a smart contract kind of like a microservice, or API, on the web.

    If the public ledger is like a database, then a smart contract is the layer that reads, writes, and executes business logic. It's going to work kind of like a vending machine. The smart contract will work like a vending machine by dispensing the item to the buyer, and transferring the cryptocurrency payment instantly to the seller.

    In order to understand how a blockchain app works, let's first look at how a normal web application works. Normally with a web application, you access a web page with your web browser. All the th HTML, CSS, and JavaScript code for this website lives on a central web server, and talks to a backend written in any programming language , which also talks to database. Instead of talking to a backend web server, this website will talk directly to the blockchain.

    The blockchain will essentially be our backend, hosting all of the code and data for our decentralized marketplace. The accompanying video footage for this portion of the tutorial begins at Now let's install all of the dependencies we need to build our project. First, we'll set up a person blockchain to develop the application locally. The dependency is a personal blockchain, which is a local development blockchain that can be used to mimic the behavior of a public blockchain.

    I recommend using Ganache as your personal blockchain for Ethereum development. It will allow you to deploy smart contracts, develop applications, and run tests. It is available on Windows, Mac, and Linux as as a desktop application and a command line tool! I'll walk you through setting up the desktop application in this tutorial. You can find the latest release for your operating system here.

    Once you've downloaded the archived package, extract the installer and run through the setup steps. Once you've installed it, you should see a this screen whenever you open it:.

    You can see some details about the server Ganache is running on, along with a list of accounts connected to the network. Each account has been credited with ether. This is a huge time saver! If you were to you create your own personal blockchain network from scratch, or develop your application on a test network, you would have to create all 10 accounts manually and credit each account with ether.

    Thankfully Ganache has already done this for us so that we don't have to worry about it. Now that you have a private blockchain running, you need to configure your environment for developing smart contracts. You can see if you have node already installed by going to your terminal and typing:.

    If you don't have node already installed you can visit the Node. Now let's install the Truffle Framework , which provides a suite of tools for developing Ethereum smart contacts with the Solidity programming language.

    You can install Truffle with NPM in your command line like this. NOTE: It's important to use this exact version of truffle specified below in order to follow along with this tutorial. Now it's time to turn your web browser into a blockchain browser.

    Most major web browsers do not currently connect to blockchain networks, so we'll have to install a browser extension that allows them to do this. I'll the Metamask extension for Google Chrome. To install Metamask, visit this link or search for the Metamask Chrome plugin in the Google Chrome web store. Reference the video walk through if you get stuck! Metamask will also allow us to manage our personal account when we connect to the blockchain, as well as manage our Ether funds that we'll need to pay for transactions.

    First, make sure you installed all of your dependencies from the previous section. Let's get started building our app quickly! Instead of setting up the project manually, we're going to use my starter kit. Create your project by cloning the starter kit like this:. This is a custom truffle project that I have created to help you start building full stack blockchain applications fast! You can create smart contracts, test them, and build front-end web apps with Web3.

    The primary responsibility of this file is to connect our project to the blockchain network. I've already set this up to connect to our Ganache personal blockchain, i. I'll also mention that I've configured the structure of this project differently from Truffle's default file structure. I have moved the smart contracts to the src directory so that they can be accessed by our react application. Now that we've seen the project structure, let's begin writing our smart contract by creating a new file in the contracts directory:.

    First, we start by declaring the version of the Solidity programming language that we want to use. Next, we declare our smart contract Marketplace. We'll add all of the smart contract code inside of the curly braces. Let's do this:. This code creates a "state variable", whose value will be stored on the blockchain.

    We'll call the variable name because we'll use it to store the name for the smart contract just for testing purposes. Since Solidity is a statically typed programming language, we must declare the string datatype before declaring the variable. Finally, we declare the state variable public so that we can read its value outside of the smart contract, which we will do momentarily. We assign the value of name inside the constructor function. This is a special function that gets called whenever the smart contract is created for the first time, i.

    Whenever it's deployed, it will set the value of name to the string we specified here. Next, let's deploy the mart contract to our Ganache personal blockhain. To do this, create a new migration file like this:.

    This file tells Truffle to to deploy our smart contract to the blockchain. It's kind of like a migration file for a traditional database if you're familiar with that. Also, note that the migration files are numbered so that Truffle knows which order to run them in.

    Now we can check our smart contract from the Truffle console. You can launch the Truffle console from the command line like this:. Now we can get a deployed copy of the smart contract inside the console with JavaScript like this:.

    Your console might return undefined , but that's ok! You can obtain the value of the smart contract by typing the variable name again like this:. Now let's write a test for the smart contract.

    Testing smart contracts is very important because you need to make sure that they work perfectly before going live on the blockchain. Remember, once you deploy them, they cannot change! You can only re-deploy a new copy.

    Let me explain this test. We write all our tests in Javascript inside this file with the Mocha testing framework and the Chai assertion library. These come bundled with the Truffle framework. We'll write all these tests in JavaScript to simulate client-side interaction with our smart contract, much like we did in the console.

    Great job! If you got stuck, feel free to re-watch this portion of the video for further clarification. You can also find a copy of all the code here.

    You can also find the code here. Now let's continue building out the marketplace smart contract. We'll create the first feature, which will allow a user to list an item for sale in the marketplace.

    In order to do that we'll need to model the product with a struct like this:. Solidity allows you to create your own data structures, with any arbitrary attributes. That's exactly what we've done by creating a Product struct. It stores all the attributes of a product that we'll need, like id , name , price , owner , and purchased.

    Next, we need a place to store this products on the blockchain. We'll create a mapping on Solidity like this:. Mappings work like associative arrays, or hash tables, with key value-pairs. Mappings have unique keys that return unique values. In our case, we will use an id as a key, and the value will be a Product struct. This will essentially allow us to look up a product by id, like a database. Next, we want to keep track of how many products exist in the smart contract with a productCount counter cache like this:.

    We use a counter cache because there's no way to know how many products existin the mapping otherwise. You can't check the "length" or "size" of a mapping in Solidiy. So if we want to fetch all the product, we must read them out individually. We'll use the counter cache to determine how may times to do this.

    External subscribers can listen for this event to verify that a product was created on the blockchain. We'll check for this event inside the smart contract tests momentarily. Now let's add some tests to ensure that this function works properly.

    Use this code inside your test file:. Let's examine each new part. First, we add some extra tools to our test suite like this. We already installed these in our package.

    Next, add 3 new accounts to the test scenario, deployer , seller , and buyer :. This sets up the test example with a before hook, which creates a product before each test runs. Finally, we create a full test for product creation like this:. First, we check that creating a product increased the product count by 1. Then, we check the smart contract event logs to see that the product was created with the correct values. We dig into the event logs like this: result.

    We check that all of these values are correct, like id, name, price, etc Finally, we check failure cases. For example, we make sure the function call fails if there is no name, or if the price is less than or equal to 0. This will be a permanent program aimed at nurturing and growing the Stratis developer community. We plan to offer a range of educational and promotional services such as training webinars, mentorship and certifications as well as competitions and events.

    As an inaugural event we will be holding the first Stratis Hackathon for developers in the upcoming weeks. Stay tuned to our next Stratis weekly for details.

    We hope you will enjoy exploring the code and will surprise us with novel ideas and applications on top of the nStratis Development Framework SDF. Stratis Team.

    Leave a Reply

    Your email address will not be published. Required fields are marked *