Part 2: The Evolution of EdgeX’s User Interface
Written by Vinoyang, EdgeX Foundry Technical Contributor and Tencent Big Data Engineer
This is the second part of the EdgeX User Interface blog. The first part of the blog focused on the work that was recently completed. You can read part 1 here. This blog will detail where we are now and where we’re headed with the next code release, named Delhi, later this year.
This blog will be divided into several sections:
1. Prepare for the participation of the community;
As mentioned earlier, the structure of the project is standardized, the details of the README file are enriched, the Make file is provided to improve the ease of use of the project, and the ongoing integration is to verify the validity of the community PR, etc.. All of this work helps insure we are ready to accept contributions from the EdgeX community.
Regarding continuous integration, I have been communicating with Jeremy Phelps of EdgeX Foundry’s DevOps working group. As with all of EdgeX, we hope to use Jenkins as the continuous integration tool for the new UI as well. In addition, we will integrate code quality inspection tools to protect the edgex-ui-go code quality.
2. Persist the data to the database and lay the foundation for subsequent database switching
As mentioned above, the data storage method implemented by edgex-ui-go is simple and a bit crude. It caches data in memory. As we all know, memory is volatile, and once power is lost, all data will be lost. Therefore, we must provide data persistence capabilities for the edgex-ui-go. We hope that the logic of edgex-ui-go maintains a loosely coupled relationship with its database, which will allow edgex-ui-go to switch between different databases according to user needs. So we implemented a data access interface (DAO for existing domain objects), and those who have worked on Java Web development should be familiar with this design pattern. Currently, I am developing a DAO implementation that interfaces with the MongoDB database.
3. Using a classic three-tier architecture for the web backend
“Control/service/dao” is a classic three-tier architecture for Web backends. Its advantage is to implement a layered structure. We are also refactoring the code to use this design pattern.
4. Reliable login verification
As we all know, security is a big problem that the Internet of Things faces. EdgeX Foundry also believes security is important. The TSC F2F conference in early June focused on security issues. The Edgex UI landing page may be one of the first and most critical interfaces for users to interact with EdgeX. So, we have to make sure that edgex-ui-go has a logical login authentication function. I will be working with David Ferriera, chair of the Edgex Security Working Group to select and use one of multiple alternatives to provide user authentication.
5. Integration testing with the GoLang version of the microservices released by EdgeX California
The California version of EdgeX has been released. The entire EdgeX Foundry community is excited, because this is the first version of EdgeX based on GoLang implementation (I was fortunate to have been a big participant in the development of the first version of EdgeX in GoLang). edgeX-ui-go is currently integrated to the old Java version of the EdgeX microservice. In this next refactoring effort , we are integrating and testing edgex-ui-go with the GoLang microservices. This will help improve consistency, integrity, stability and availability of the entire EdgeX ecosystem in GoLang.
6. Build a Docker image of edgex-ui-go
As with all EdgeX microservices, we need to containerize the edgex-ui-go for easy of deployment. However, this is a lesser priority in our current work.
7. Fix some remaining bugs
At present, most of the base UI is working, but there are a few bugs to fix. For example, the device profile cannot be upload as required, but we are working to solve these issues.
The EdgeX UI as part of the Delhi Release and Future Work
So what’s the plan for formally releasing the new UI? The current work – and all the refactoring, is expected to be released with the Delhi Release of EdgeX (October 2018).
Beyond the current release there is more work to complete. First, we want to push the front end of edgex-ui-go. At present, the front end of edgex-ui-go can be said to be very rudimentary, and data visualization capabilities are very limited. Currently I am researching and experimenting with an open source and powerful admin template named gentelella. Here is an example of the type of data visualization that gentelella can produce.
The reasons for using this type of UI tool are as follows:
- A feature-rich, elegant interface UI that will give user a good first impression of edgex
- Easy to use; which is important in a community were very few community members have professional front-end development experience, and most people only have experience in developing back-end languages
- A popular template capability that can save a lot of front-end workload, such as interface layout, settings, components (such as login, table, forms, uploads, downloads, etc.), and is created by many people with professional experience
We also hope to add support for more management and visualization of EdgeX itself. At present, edgex-ui-go provides only simple support of device onboarding, export client registration, rule configuration and other functions. We hope to provide more and improved management capabilities to include better metadata management, scheduler management, log viewing, and more. At the same time, we expect to collect more EdgeX user needs for monitoring and visualization and incorporate those needs into future implementations.
Edgex-ui-go is part of the community effort. If you want to participate in EdgeX UI development, we welcome your comments, suggestions, bug fixes, code contributions and reviews. Find out more on our wiki page here.
Or, you can visit EdgeX Rocket.Chat and share your thoughts in the #community channel.