People are involved now a days with KYC implementation and Asset Management of BlockChain. I don't exactly know how they are taking the input in that case, but can we Implement BlockChain on .HTML files?
Like taking particular input from User on a Webpage, and then doing the Base64 Encoding, and using it on a network of Blockchain?
I'm working on the Hyperledger project.
Yes you can. That is the whole idea. You can indeed create a web based user interface to interact with your chaincode.
Have you looked at the demo examples available ? The marble one for instance ?
The backend of this application is the GoLang code running in blockchain network, while the Web based user interface is created to set the values and pass them to the chaincode. Interacting with the chaincode is done with a HTTP REST call to a peer on the network.
here is the marble application flow for you convenience,
Please visit here for further details and guidelines.
Related
I am familiar with firebase platform, but I am relatively a new user of the google cloud platform as whole.
I am working on a project built using a microservices structure, and I do have so many question for which I cannot find an answer or better I cannot find any example.
Unfortunately all the example that I am able to find are way to simple to be able to extrapolate a viable answer for my issues.
I adopted the new cloud run offer, and I decided to play with the full managed version (not kubernetes). I built few microservices (each service is built using express for node or flask for python - depending on what the services does). Each microservices expose it's own endpoint and has it's own api to call the methods - and I use a service account to allow the application to perform the internal calls.
I now want to expose the application to the external (specifically to my client built using vuejs technology), and I was trying to leverage another google product to create and expose an api: the google endpoints.
My question (specifically referred to the cloud run structure) is related to how is possible and what I need to do to create an api endpoints to communicate with the client app, that internally calls multiple services and combine their response in one.
Just to be clear, let's make an example:
Cloud run service 1 -> crud user api
Cloud run service 2 -> crud product api
Cloud endpoint external visible api -> get user from service 1, and after get products from service 2 and return the combined response all green products for user Jane Doe.
How I can aggregate the response directly in the endpoint gateway, check for failure and if everything goes smooth send the aggregate response to the client?
I need to build the aggregate endpoint in something else, like a cloud function for example? or I can do it directly in the google endpoints gateway?
Note that for cloud run the google endpoints is another cloud run container.
Thanks guys for some help, running pretty much out of option here.
As per my understanding, API Gateway should just work as a proxy, presenting all micro services as a single endpoint. To this scenarios I think you can have following 2 approaches :
1: Implement a new micro service (or on any of the existing one) which will do invocations and aggregation of responses.
2: Client(like UI) can invoke the services and do the aggregation on their side as well.
I feel, it is not a good idea to do it at api-gateway.
In my opinion, from an architectural point of view, the best option for you is to create a new microservice which will take the responses from the other two and then, it will aggregate them.
I understand that you want to aggregate the responses in a api-geteway and you are not able to find code examples for it. Here I was able to find a guide on what are you wanting to implement. The full code implementation can be found in this repository.
Keep in mind though, this idea of implementation is not a best practice.
This is ok, only if those two services that are going to be combined are independent. Meaning there is no functional/business relation between them and the concurrency or inconsistency problem will not occur in the process of aggregating.
I am a computer science engineering student. I am working on a crowdfunding cordapp, but I still have some confusions :
I want to know if Corda is the most suitable protocol to use in a crowdfunding app or if there is better solutions ?
Is it logical that every person who wants to contribute in a project or to add a project on the platform is mandatory to run a corda network and have his own node ?
If it's not how could i handle the users accounts and their transactions ??
The next point is that I can’t figure out the right architecture of the app.
If anyone can clarify these points I would be grateful
I dont know about Corda, but I made the crowdfunding app using Truffle framework. Truffle is one of the best framework for developing Smart Contract and Distributted application. The framework allows you to run in memory blockchain too for the testing.
Regarding the Crowdfunding app I created all the business logic in the Smart Contract and handle the authentication through the meta mask plugin. The user has to have metamask which ease the transaction too. So every transaction which add the data in blockchain goes through the MetaMask. Whereas I store the etherum address of the user in the array and relevant data in the structure.
For the frontend part I used the angularJs to create the Distributted application. The app interact with Web3 library to communicate with the Blockchain. You can also find the angular box as a starting point from here
how corda node to do high available? (1. Container way or 2. Corda way)?
could I install the second jetty server with same restful interface to rpc invoke the same client node as well the first jetty server for flow?
future plan ( like mesos auto deploy in multiple machine)?
JMX monitor active MQ messages, queues, topic?
Jetty performance or function set as it embed into core code, sample if I want to set a filter that very hard to not touch core project? Performance parameter how to set?
JPA Custom Query if have set a flag let it not involve Vault table for offline chain to use?
How to design sample for a table to associate a foreign key to another table?
Shell script how to communicate with Corda Node?
This is a lot of questions! forgive me if I've misunderstood them here but I'll do my best to answer them.
not exactly sure what you mean here but corda has built in redundancy features and you can run corda nodes in containers as well (here's an example repo doing so: https://github.com/EricMcEvoyR3/corda-docker-compose)
So we now recommend using spring boot servers to build an HTTP server on top of a corda node. Take a look here for an example : https://github.com/corda/samples-java/tree/master/Advanced/obligation-cordapp
Here's a link to the corda planned features page: https://www.corda.net/platform-roadmap/ it's not super thorough but it covers the basics.
Corda has some JMX integrations you can find out more about them here: https://docs.corda.net/docs/corda-os/4.4/node-administration.html#monitoring-via-jolokia
Corda jetty webservers are basically deprecated, here's another blog post on how to migrate off of them: https://www.corda.net/blog/spring-cleaning-migrating-your-cordapp-away-from-the-deprecated-corda-jetty-web-server/
The corda docs have a whole page on the JPA and how it's supported, you can find more here: https://docs.corda.net/docs/corda-os/4.4/api-persistence.html
This depends entirely on your cordapp and the data you're trying to model. It's not something that's easy to help with here, I will say however that usually it's not necessary for most cordapps to do this.
You can use the corda shell to communicate with the corda node, more info on that here: https://docs.corda.net/docs/corda-os/4.4/shell.html
This post http://www.theserverside.net/tt/articles/showarticle.tss?id=Top5WSMistakes
encourages me to create the web service for business logic layer but many people use it in the data access layer.
I want to create a project where i want to access the same data repository from a desktop application, website and a cell phone. What would you recommend me?
Is there any case it may be a good idea to implement web services to both layers?
The question is too open ended so the answer is: it depends.
What needs do your applications have for the data? Is it just data access or some business logic involved? If it is just accessing of data, do you really want the client to have direct control over it? How similar are the three applications? Do they share functionality or just data?
As I see it there are two main paths you can chose:
1 - expose a web service for the business, with the data hidden behind the web service. This is a good setup if the three clients (I'll call the desktop app, web app and cell phone "clients" since that is what they are) share functionality (i.e. they are different views for the same business model). This avoids duplicating similar business logic in all the clients;
2 - expose the data directly with a web service. This is a good setup if the three clients have nothing in common but just use the same data for different purposes. But in this case, with the three sets of business logic, where are you going to put the logic? In the clients? How will that work for the desktop application (considering you install this desktop app 300 times or so)? You again need some service and the clients to be thin clients not thick ones.
If you take 1) and 2) into consideration you will see that usually it is better to have a service layer in front of your data.
Going back to the "it depends", analyze your special needs first and only then choose the solution that is best suited for your situation.
How about a point 3? make your data access layer into a library (.jar, .dll or whatever technology you are using) and make that available to the (1? 2? 3?) business web services that serve your clients?
I have created a small game in Java and I would like to add the ability for a player to publish his highscores online.
I'm willing to write the server software myself (it's easy these days with Ruby Mongrel, or even C++). I just need to have some sort hosting. One solution that immediately comes to mind is Amazon EC2. But that's kind of expensive for my needs. Since the requirements are very minimal (I don't even need a website, just a web service) I think there may be a cheaper solution out there.
Does anyone know of a free or cheap provider for this kind of thing?
Update
For those interested, this is solution I came up with:
a SliceHost
purchased a domain name
C++ HTTP server
built upon the Poco HTTPServer
uses SQLite database via Poco Data
Server implements a REST API supporting
High Score table
/hs content type deduced from accept header
/hs.xml forces xml
/hs.txt forces plain text
/hs/add html form, does a POST using XMLHttpRequest
/hof Hall of Fame, content type deduced from accept header
/hof.txt forces plain text
/hof.xml forces xml
game: my own Tetris clone written in Clojure
Something like Slicehost or any other small-scale VPS provider could probably work. You might even be able to write it as a small app and publish it on Google App Engine, which is free up to a certain point.
google app engine comes to mind: http://code.google.com/appengine/